package com.behelpful.demo.search.annotations;

import java.lang.annotation.*;

/**
 * ElasticSearch实体类注解,标明实体类存储的索引及Type
 *
 * @author Alay
 * @date 2020-11-18 15:53
 * @project behelpful
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ISearchDocument {

	/**
	 * ES 索引 纯小写命名
	 *
	 * @return
	 */
	String indexName() default "";

	/**
	 * ES7以后默认_doc，即移除了type(小驼峰命名)
	 *
	 * @return
	 */
	String type() default "_doc";
}